<?php
/**
 * 中秋品牌游戏模块定义
 *
 * @author 超级无语
 * @url http://bbs.we7.cc/
 */
defined('IN_IA') or exit('Access Denied');

class Cjwy_zhongqiuModule extends WeModule {

	public function settingsDisplay($settings) {
		global $_W, $_GPC;
		//点击模块设置时将调用此方法呈现模块设置页面，$settings 为模块设置参数, 结构为数组。这个参数系统针对不同公众账号独立保存。
		//在此呈现页面中自行处理post请求并保存设置参数（通过使用$this->saveSettings()来实现）
		if(checksubmit()) {
			//字段验证, 并获得正确的数据$dat
			$cfg = array(
				'title' => htmlspecialchars_decode($_GPC['title']), //活动标题
				'playerpic' => $_GPC['playerpic'], //玩家坐骑
				'jflogo' => $_GPC['jflogo'], //加分logo
				'wxlogo' => $_GPC['wxlogo'], //障碍物logo
				'adstartpic' => $_GPC['adstartpic'], //开始引导页
				'bgpic' => $_GPC['bgpic'], //背景图片
				'endpic' => $_GPC['endpic'], //结束时背景图片
				'morepic' => $_GPC['morepic'], //再玩一次图标
				'sharetitle' => htmlspecialchars_decode($_GPC['sharetitle']), //分享标题
				'sharedesc' => htmlspecialchars_decode($_GPC['sharedesc']), //分享描述
				'sharepic' => $_GPC['sharepic'], //分享图标
				'fxbutton' => htmlspecialchars_decode($_GPC['fxbutton']), //分享按钮
				'fxlogo' => htmlspecialchars_decode($_GPC['fxlogo']), //分享图标
			);
			if ($this->saveSettings($cfg)) {
				message('游戏配置保存成功', 'refresh');
			}
		}
		//这里来展示设置项表单
		include $this->template('setting');
	}

}